﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using AbstractFramework.Display;
using AbstractFramework;

namespace AbstractFramework.LogicControl
{
    public interface IElevator
    {
        bool NeedOpen
        {
            get;
            set;
        }
        int Id
        {
            get;
            set;
        }
        int Floor
        {
            get;
            set;
        }
        MovementStatus State
        {
            get;
            set;
        }
        int PeopleNum
        {
            get;
            set;
        }
        int[] FbdFloor
        {
            get;
            set;
        }
        IController ControllerOfElevator
        {
            get;
            set;
        }
        IElevatorDisplay Elevator_Display
        {
            get;
            set;
        }
        IFloorIndicatorDisplay[] UpFloor_Indicator
        {
            get;
            set;
        }
        IFloorIndicatorDisplay[] DownFloor_Indicator
        {
            get;
            set;
        }
        IInsideIndicatorDisplay Inside_Indicator
        {
            get;
            set;
        }
        IOutsideButtonPanelDisplay[] OutsideButtonPanel
        {
            get;
            set;
        }
        IInsideButtonPanelDisplay InsideButtonPanel
        {
            get;
            set;
        }
        IDoor _Door//暂时不区分电梯门和楼层门
        {
            get;
            set;
        }
        void onArrived(int objectFloor);
        void onOpened();//用于向控制器报告当前任务执行完毕，请求撤销当前任务，同时获得下一个任务
        void onClosed();
        void onPositionChanged(int oldPosition, int newPosition);
        bool handleEmergency(int emergencyType);//处理紧急情况，如火警=0、超重=1等。处理成功，返回true
        bool moveTo(int floorNum,bool openDoor);//将电梯移动到floorNum层,并控制是否开门。成功，返回true
    }
}
